package catherineliu.main.factory.shape;

/**
 * 项目：DesignPatternsDemo
 * 文件描述：创建实现接口的实体类
 * 作者：ljj
 * 创建时间：2020/11/25
 */
public class Rectangle implements ShapeInterface {

    private double a, b;

    public Rectangle(double a, double b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public void draw() {
        System.out.println("Rectangle draws area: " + (a * b));
    }
}
